package com.jzit168.library_base.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

/**
 *@Desc: 基类Activity
 *@Author: Android Developer
 *@Date: 2020/10/14
 *
 **/
open class BaseActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        initWindow()
        initView(savedInstanceState)
        initListener()
    }

    open fun initWindow(){}

    open fun initView(savedInstanceState: Bundle?) {
        ActivityStackManager.addActivity(this)
    }

    open fun initListener() {
        //控件的监听事件
    }

    override fun onDestroy() {
        super.onDestroy()
        ActivityStackManager.removedActivity(this)
    }
}